{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "from sklearn import metrics\n",
    "import seaborn as sns\n",
    "from sklearn.model_selection import train_test_split, GridSearchCV"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>pregnants</th>\n",
       "      <th>Plasma_glucose_concentration</th>\n",
       "      <th>blood_pressure</th>\n",
       "      <th>Triceps_skin_fold_thickness</th>\n",
       "      <th>serum_insulin</th>\n",
       "      <th>BMI</th>\n",
       "      <th>Diabetes_pedigree_function</th>\n",
       "      <th>Age</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.639947</td>\n",
       "      <td>0.866045</td>\n",
       "      <td>-0.031990</td>\n",
       "      <td>0.670643</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>0.166619</td>\n",
       "      <td>0.468492</td>\n",
       "      <td>1.425995</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>-0.844885</td>\n",
       "      <td>-1.205066</td>\n",
       "      <td>-0.528319</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>-0.852200</td>\n",
       "      <td>-0.365061</td>\n",
       "      <td>-0.190672</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1.233880</td>\n",
       "      <td>2.016662</td>\n",
       "      <td>-0.693761</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>-1.332500</td>\n",
       "      <td>0.604397</td>\n",
       "      <td>-0.105584</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>-0.844885</td>\n",
       "      <td>-1.073567</td>\n",
       "      <td>-0.528319</td>\n",
       "      <td>-0.695245</td>\n",
       "      <td>-0.540642</td>\n",
       "      <td>-0.633881</td>\n",
       "      <td>-0.920763</td>\n",
       "      <td>-1.041549</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>-1.141852</td>\n",
       "      <td>0.504422</td>\n",
       "      <td>-2.679076</td>\n",
       "      <td>0.670643</td>\n",
       "      <td>0.316566</td>\n",
       "      <td>1.549303</td>\n",
       "      <td>5.484909</td>\n",
       "      <td>-0.020496</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   pregnants  Plasma_glucose_concentration  blood_pressure  \\\n",
       "0   0.639947                      0.866045       -0.031990   \n",
       "1  -0.844885                     -1.205066       -0.528319   \n",
       "2   1.233880                      2.016662       -0.693761   \n",
       "3  -0.844885                     -1.073567       -0.528319   \n",
       "4  -1.141852                      0.504422       -2.679076   \n",
       "\n",
       "   Triceps_skin_fold_thickness  serum_insulin       BMI  \\\n",
       "0                     0.670643      -0.181541  0.166619   \n",
       "1                    -0.012301      -0.181541 -0.852200   \n",
       "2                    -0.012301      -0.181541 -1.332500   \n",
       "3                    -0.695245      -0.540642 -0.633881   \n",
       "4                     0.670643       0.316566  1.549303   \n",
       "\n",
       "   Diabetes_pedigree_function       Age  \n",
       "0                    0.468492  1.425995  \n",
       "1                   -0.365061 -0.190672  \n",
       "2                    0.604397 -0.105584  \n",
       "3                   -0.920763 -1.041549  \n",
       "4                    5.484909 -0.020496  "
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X = pd.read_csv('data/FE_pima-indians-diabetes.csv')\n",
    "y = X['Target']\n",
    "X = X.drop('Target', axis = 1)\n",
    "X.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 拆分测试集和训练集"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.2, random_state = 15)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1. 使用LogisticRegressionCV 和 log似然损失评价指标 (L2正则)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.linear_model import LogisticRegressionCV\n",
    "LogistL2_Log = LogisticRegressionCV(Cs = 20, scoring = 'neg_log_loss', penalty = 'l2', solver='liblinear', cv = 5, random_state=10).fit(X_train, y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-0.68586019, -0.67493242, -0.65091648, -0.60853182, -0.55517595,\n",
       "       -0.50909489, -0.48165556, -0.47137119, -0.46999784, -0.47084799,\n",
       "       -0.47155939, -0.47190648, -0.4720508 , -0.47210745, -0.47212922,\n",
       "       -0.47213752, -0.47214067, -0.47214187, -0.47214232, -0.4721425 ])"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "LogistL2_Log.scores_[1].mean(axis = 0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1.00000000e-04, 2.63665090e-04, 6.95192796e-04, 1.83298071e-03,\n",
       "       4.83293024e-03, 1.27427499e-02, 3.35981829e-02, 8.85866790e-02,\n",
       "       2.33572147e-01, 6.15848211e-01, 1.62377674e+00, 4.28133240e+00,\n",
       "       1.12883789e+01, 2.97635144e+01, 7.84759970e+01, 2.06913808e+02,\n",
       "       5.45559478e+02, 1.43844989e+03, 3.79269019e+03, 1.00000000e+04])"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "LogistL2_Log.Cs_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.23357215])"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "LogistL2_Log.C_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 0.41950336,  1.14807954, -0.07866709,  0.02100797, -0.15013756,\n",
       "         0.61655432,  0.40661389,  0.2144362 ]])"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "LogistL2_Log.coef_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEKCAYAAADjDHn2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3XmcVPWd7vHPt6o3mm42aaClWURAWRpRWsDRJIpGgeSiETEQdXQyM8mdq2Myk5jRMTNOdCZxJpOEyYz33hjNMknUoIlbxCAa1yQqjYJssogCDSjNIksDvX7njzqtBTZUdVOnT1X383696lVVp051PaDU02f7/czdEREROZ5Y1AFERCT7qSxERCQllYWIiKSkshARkZRUFiIikpLKQkREUlJZiIhISioLERFJSWUhIiIp5UUdIFP69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Rs0joG7g1AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "scores = np.array(-LogistL2_Log.scores_[1].mean(axis = 0))\n",
    "C_values = np.array(LogistL2_Log.Cs_)\n",
    "plt.plot(np.log10(C_values), scores)\n",
    "plt.xlabel('log(C)')\n",
    "plt.ylabel('logloss')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2. 使用LogisticRegressionCV 和 正确率评价指标 (L2正则)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "LogistL2_Accu = LogisticRegressionCV(Cs = 20, scoring = 'accuracy', penalty = 'l2', solver='liblinear', cv = 5, random_state=10).fit(X_train, y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.73447911, 0.73609201, 0.73611846, 0.74270227, 0.74431518,\n",
       "       0.76877314, 0.76710735, 0.76874669, 0.7703596 , 0.7703596 ,\n",
       "       0.77199894, 0.77199894, 0.77199894, 0.77199894, 0.77199894,\n",
       "       0.77199894, 0.77199894, 0.77199894, 0.77199894, 0.77199894])"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "LogistL2_Accu.scores_[1].mean(axis = 0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1.00000000e-04, 2.63665090e-04, 6.95192796e-04, 1.83298071e-03,\n",
       "       4.83293024e-03, 1.27427499e-02, 3.35981829e-02, 8.85866790e-02,\n",
       "       2.33572147e-01, 6.15848211e-01, 1.62377674e+00, 4.28133240e+00,\n",
       "       1.12883789e+01, 2.97635144e+01, 7.84759970e+01, 2.06913808e+02,\n",
       "       5.45559478e+02, 1.43844989e+03, 3.79269019e+03, 1.00000000e+04])"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "LogistL2_Accu.Cs_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1.62377674])"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "LogistL2_Accu.C_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 0.45275704,  1.23650723, -0.10479382,  0.00501529, -0.18818514,\n",
       "         0.67626222,  0.43493542,  0.21882326]])"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "LogistL2_Accu.coef_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZoAAAEKCAYAAAArYJMgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3XmYVOWd9vHv3c3WCNLN3naBLYIaFUO0XRIjbhCNyShR3GImmMigSbyimUlcxnfmnS2vTJyJWUxikJgQTYwZjcuoCEhQiFtsDSJGBMQFFAFFBETW/r1/1Gkt2uoNuvp0U/fnuuqqszx16leJcHOW53kUEZiZmRVKSdoFmJnZns1BY2ZmBeWgMTOzgnLQmJlZQTlozMysoBw0ZmZWUA4aMzMrKAeNmZkVlIPGzMwKqkvaBXQE/fv3j+rq6rTLMDPrVJ5++um3ImJAc+0cNEB1dTW1tbVpl2Fm1qlIerUl7XzpzMzMC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i+Iw9sjZJojaUTO6unAorRqySXpVOBK4PSI2JR2PR3UU8AISftJ6gacB9ybck0dlrL/yvsF8EJEfD/teupJGlD/VKWkMmAMHeDPYURcHRGZ5O+s84A/FipkwEGzp5ssaaGkBWQv7XWIRz6BG4DewKzk0esb0y4IQNIXJK0APgncL2lGWrUkD0tcCswge2P79xHxfFr15JJ0G/A4cKCkFZIuSrsmsv9C/1vgpOS/qfnJv9bTVgnMSf4MPkX2Hk1BHyXuiDwygJmZFZTPaMzMrKAcNGZmVlAOGjMzKygHjZmZFZSDxszMCspBY9ZOJG1svlWTn79D0rBkuZekn0t6KRkVeK6koyV1S5bdGds6DAeNWScg6RCgNCKWJZumkh3YckREHAJcCPRPBuCcDZybSqFmeThozNqZsq5LOtM+J+ncZHuJpJ8mZyj3SXpA0vjkYxcA9WPE7Q8cDfyfiKgDSEZ5vj9pe3fS3qxD8Om1Wfs7k+zcJB8H+gNPSZpLtnd7NTASGEh2RICbk88cC9yWLB8CzE8Ga8xnIXBkQSo32wU+ozFrf58GbouIHRGxCniEbDB8GvifiKhLxsqbk/OZSmBNSw6eBNBWSb3buG6zXeKgMWt/+aYAaGo7wPtkR9kFeB74uKSm/vx2BzbvQm1mbc5BY9b+5gLnJhNiDQBGA38G/gScldyrGQSckPOZF4DhABHxElAL/GsyajGSRkg6I1nuB6yJiG3t9YPMmuKgMWt/dwELgGeBPwJXJJfK7iQ7zcRC4OdkZ4h8N/nM/ewcPBPJTuC2VNJzwE18OF/NicADhf0JZi3n0ZvNOhBJvSJiY3JW8mfg2Ih4M5nLZE6y3thDAPXH+ANwdUS82A4lmzXLT52ZdSz3JRNldQP+vX4CvYh4X9L/BaqA1xr7cDJJ2t0OGetIfEZjZmYF5Xs0ZmZWUA4aMzMrKAeNmZkVlIPGzMwKykFjZmYF5aAxM7OC+v+UhYZT9kY2MwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "scores = np.array(-LogistL2_Accu.scores_[1].mean(axis = 0))\n",
    "C_values = np.array(LogistL2_Accu.Cs_)\n",
    "plt.plot(np.log10(C_values), scores)\n",
    "plt.xlabel('log(C)')\n",
    "plt.ylabel('logloss')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 3. 使用LogisticRegressionCV 和 log似然损失评价指标 (L1正则)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "LogistL1_Log = LogisticRegressionCV(Cs = 20, scoring = 'neg_log_loss', penalty = 'l1', solver='liblinear', cv = 5, random_state=10).fit(X_train, y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-0.69314718, -0.69314718, -0.69314718, -0.69314718, -0.69314718,\n",
       "       -0.62675454, -0.51693274, -0.47623895, -0.47001618, -0.47049841,\n",
       "       -0.47138592, -0.47182749, -0.47201992, -0.47209621, -0.47212325,\n",
       "       -0.47213779, -0.47214257, -0.47214375, -0.47214065, -0.47214045])"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "LogistL1_Log.scores_[1].mean(axis = 0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1.00000000e-04, 2.63665090e-04, 6.95192796e-04, 1.83298071e-03,\n",
       "       4.83293024e-03, 1.27427499e-02, 3.35981829e-02, 8.85866790e-02,\n",
       "       2.33572147e-01, 6.15848211e-01, 1.62377674e+00, 4.28133240e+00,\n",
       "       1.12883789e+01, 2.97635144e+01, 7.84759970e+01, 2.06913808e+02,\n",
       "       5.45559478e+02, 1.43844989e+03, 3.79269019e+03, 1.00000000e+04])"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "LogistL1_Log.Cs_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.23357215])"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "LogistL1_Log.C_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEKCAYAAADjDHn2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAHWRJREFUeJzt3Xt4XPV95/H3R5Il25KwjXUJxhgba5yFcAso5GLBA0kgzg3SkCaQbpY0SfmnbNJ2Nw1suuEp2d2wT57dpt2yT0IILc9uA0lzNQmpQzYkXBKCxcWA7YKFCVgYsHwD35As6bt/zJE9yLJmJOvozIw+r4d5NOc358x8DXg+Oud3OYoIzMzMxlOTdQFmZlb+HBZmZlaUw8LMzIpyWJiZWVEOCzMzK8phYWZmRTkszMysKIeFmZkV5bAwM7Oi6rIuYKq0tLTE0qVLsy7DzKyiPPzww9sjorXYfqmGhaRVwN8CtcAtEXHjqNf/Brgo2ZwLtEXE/OS1q4C/Sl77LxFx23iftXTpUrq7u6eyfDOzqifpuVL2Sy0sJNUCNwEXA73AWkmrI2LDyD4R8ecF+/974M3J8+OB64FOIICHk2N3pVWvmZkdXZp9FucBPRGxOSIGgDuAy8bZ/0rg9uT5e4C7I2JnEhB3A6tSrNXMzMaRZlicCGwp2O5N2o4g6WRgGfDLiRwr6WpJ3ZK6+/r6pqRoMzM7UpphoTHajrYe+hXA9yJiaCLHRsTNEdEZEZ2trUX7Z8zMbJLSDIte4KSC7cXA1qPsewWHL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kyG9X8+6oBGS/kBSL/B24KeS1mRRRzIA4BpgDfmO2u9GxPosahlN0u3Ab4E3SuqV9Omsa0qsBD4BvDP5/+qx5DfnrJ0A3JP8HVxLvs8i1aGq5cYzuM3MrCifWZiZWVEOCzMzK8phYWZmRTkszMysKIeFmZkV5bAwmwBJe4vvNe7x35N0SvK8SdI3JD2TrGR6r6S3SqpPns+oSbNW3hwWZtNE0puA2ojYnDTdQn4xv1xEvAn4JNCSLDr4/4CPZVKo2RgcFmaToLyvJpMln5D0saS9RtL/Ts4UfiLpLkkfSQ77I2BkTa3lwFuBv4qIYYBkddqfJvv+KNnfrCz4NNdscj5M/r4GZwEtwFpJ95KfgbwUOANoIz9z+9bkmJXA7cnzNwGPJYvTjeVJ4C2pVG42CT6zMJucLuD2iBiKiJeBX5P/cu8C/jkihpO1xe4pOOYEoK+UN09CZEBS8xTXbTYpDguzyRlr+fHx2gEOkF8dFGA9cJak8f4ONgCvTaI2synnsDCbnHuBjyU3xGkFLgAeAu4HLk/6LtqBCwuO2Qh0AETEM0A38NfJSqtIykm6LHm+EOiLiIPT9QcyG4/Dwmxyfgg8DqwDfgn8ZXLZ6fvkl7h/EvgG+bu8vZIc81NeHx6fIX8Dpx5JTwDf5PD9Li4C7kr3j2BWOq86azbFJDVFxN7k7OAhYGVEvJTcB+GeZPtoHdsj7/ED4LoyuZe4mUdDmaXgJ8mNcuqBL4/cRCsiDki6nvx9uJ8/2sHJjZJ+5KCwcuIzCzMzK8p9FmZmVpTDwszMinJYmJlZUQ4LMzMrymFhZmZFOSzMzKyo/w9aJB4oK9ItuwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "scores = np.array(-LogistL1_Log.scores_[1].mean(axis = 0))\n",
    "C_values = np.array(LogistL1_Log.Cs_)\n",
    "plt.plot(np.log10(C_values), scores)\n",
    "plt.xlabel('log(C)')\n",
    "plt.ylabel('logloss')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 4. 使用LogisticRegressionCV 和 正确率评价指标 (L1正则)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "metadata": {},
   "outputs": [],
   "source": [
    "LogistL1_Accu = LogisticRegressionCV(Cs = 20, scoring = 'accuracy', penalty = 'l1', solver='liblinear', cv = 5, random_state=10).fit(X_train, y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.63844527, 0.63844527, 0.63844527, 0.63844527, 0.63844527,\n",
       "       0.71819143, 0.75893707, 0.7703596 , 0.76869381, 0.77194606,\n",
       "       0.77199894, 0.77199894, 0.77199894, 0.77199894, 0.77199894,\n",
       "       0.77199894, 0.77199894, 0.77199894, 0.77199894, 0.77199894])"
      ]
     },
     "execution_count": 82,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "LogistL1_Accu.scores_[1].mean(axis = 0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1.00000000e-04, 2.63665090e-04, 6.95192796e-04, 1.83298071e-03,\n",
       "       4.83293024e-03, 1.27427499e-02, 3.35981829e-02, 8.85866790e-02,\n",
       "       2.33572147e-01, 6.15848211e-01, 1.62377674e+00, 4.28133240e+00,\n",
       "       1.12883789e+01, 2.97635144e+01, 7.84759970e+01, 2.06913808e+02,\n",
       "       5.45559478e+02, 1.43844989e+03, 3.79269019e+03, 1.00000000e+04])"
      ]
     },
     "execution_count": 83,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "LogistL1_Accu.Cs_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 84,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1.62377674])"
      ]
     },
     "execution_count": 84,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "LogistL1_Accu.C_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZQAAAEKCAYAAAA1qaOTAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3Xt0nPV95/H3R5Ite+SbRrKNDZIMlgmXhDgcQUjstOHiLk3bmCaEwCY5pgml29NsstumCVlymtP05IQtve12N00cQtdpU3oJ14YQsF0CJReIuBsM+FJsjI0tfMEXWbYlffePeQSyM5JH0sw8I83ndc6cmWee3zPzFYn10fP7/Z7fo4jAzMxsrGrSLsDMzCYGB4qZmRWFA8XMzIrCgWJmZkXhQDEzs6JwoJiZWVE4UMzMrCgcKGZmVhQOFDMzK4q6tAsop+bm5liwYEHaZZiZjSuPP/746xEx+2TtqipQFixYQGdnZ9plmJmNK5K2FNLOXV5mZlYUDhQzMysKB4qZmRWFA8XMzIrCgWJmZkXhQDEzs6JwoJiZWVGkch2KpCzwT8AC4GXgqojYm6ddK3AL0AIE8IGIeHnQ/r8GfisippWy3juf3MZ/dB0q5VdUvMWts7jkrLlpl2FmFSytCxtvANZGxE2Sbki2v5Cn3XeAr0bEaknTgP6BHZI6gFnlKPZfn97Bgy/uKsdXVaQIaJ5WT+eXHChmNrS0AmU58P7k9SrgR5wQKJLOAeoiYjVARBwctK8WuBn4z8BvlrrYW6+9oNRfUdG+/qON/OkPX+TgkV6m1VfV4gpmNgJpjaHMjYgdAMnznDxtzgT2SbpD0pOSbk6CBODTwD0Dn2Gl1ZZtAGDr7u6UKzGzSlayPzclrQFOybPrxgI/og54H/AuYCu5MZdrJd0HfIS3znBOVsf1wPUAra2tBX61D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iZWVE4UMzMrCgcKGZFJOngyVsNe/z3JJ2RvJ4m6ZuSNiUr2D4s6d2SJievfWGyVRQHilmFkHQuUBsRm5O3biG3QOOiiDgXuBZoThaRXAt8NJVCzYbgQDErAeXcnFxw+qykjybv10j6enLG8X1JP5B0ZXLYx4CB9c8WAu8GvhQR/QDJisT3Jm3vStqbVQyfMpuVxofI3RfjnUAz8HNJD5O70nsB8A5gDrmr429NjlkC3Ja8Phd4KllwMJ91wAUlqdxslHyGYlYaS4HbIqIvInYCD5ELgKXAv0REf7IO3IODjpkHdBXy4UnQHJU0vch1m42aA8WsNPItSz/c+wCHya0IC/Ac8E5Jw/0brQd6RlGbWUk4UMxK42Hgo8lNl2YDvwQ8BjwCfDgZS5kLvH/QMeuBdoCI2AR0An+crLCLpEWSlievm4CuiDhWrh/I7GQcKGalcSfwDPA08G/A55MurtvJ3frhcJZ3AAAApUlEQVRgHfBNcncbfCM55l6OD5jryN0kbKOkZ4Fv8da9Ui4GflDaH8FsZLzasFmZSZoWEQeTs4zHgCUR8VpyH40Hk+2hBuMHPuMO4IsR8WIZSjYriGd5mZXf95ObMU0G/mTgJm0RcVjSl8ndU37rUAcnN+K6y2FilcZnKGZmVhQeQzEzs6JwoJiZWVE4UMzMrCgcKGZmVhQOFDMzKwoHipmZFcX/B1Avw2YIFhNPAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "scores = np.array(-LogistL1_Accu.scores_[1].mean(axis = 0))\n",
    "C_values = np.array(LogistL1_Accu.Cs_)\n",
    "plt.plot(np.log10(C_values), scores)\n",
    "plt.xlabel('log(C)')\n",
    "plt.ylabel('logloss')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 5.验证上述四种模型在测试集上的评分情况"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {},
   "outputs": [],
   "source": [
    "### 观察四种模型的系数分布情况"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "coef = pd.DataFrame(LogistL2_Log.coef_) #coef\n",
    "coef = coef.T\n",
    "coef = pd.concat([coef, pd.DataFrame(LogistL2_Accu.coef_).T, pd.DataFrame(LogistL1_Log.coef_).T, pd.DataFrame(LogistL1_Accu.coef_).T], axis = 1)\n",
    "coef.columns = ['LogistL2_Log', 'LogistL2_Accu', 'LogistL1_Log', 'LogistL1_Accu']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\jack-pc\\appdata\\local\\programs\\python\\python37-32\\lib\\site-packages\\scipy\\stats\\stats.py:1713: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.\n",
      "  return np.add.reduce(sorted[indexer] * weights, axis=axis) / sumval\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAEJCAYAAAB8Pye7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzsvXeYHOWVqP+e6u6Z6Z4cNcoCCQkkQEIEm5yTCbYx9pLBGFjAxnvNfdZh7evd9c/eXXt/d6/vJrNeex1YG2wTBSIKEEhIKAuUZqTJOec8XfXdP6pbGo1mNKlCd0+9z9PPzHRVf+d0TdWpU+c73zmilMLDw8PDY3ahua2Ah4eHh4fzeMbfw8PDYxbiGX8PDw+PWYhn/D08PDxmIZ7x9/Dw8JiFeMbfw8PDYxbiGX+PuE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g+sEFVryagdzNQLCKz3eNngHdd+cyYXN/WBO4dL36w4XbgOVUtVtViYAbwuIjkAW8Cvxdz33ycqG+FiMxwZRPc06eASldW6d5nuPDErikg69tmnKR320xVXs7LDYgCZ2K2P8DJ2b0NHAB2AdPduiU4f7/2AH8KnO2d48PpXfIZsA/4H77Ovb2Ck2970a1/s9fnbgGO4eTt9rnb3w+gdy1O9BF7j2qgDvgUOAj8FMhx66/HedA+AP4S+Fk22xDIAy4C9/WS/weOAxqDk5poAvYDDe75J1z77gfecmW5OA/kPuAfgcOkJuefTnZ90i1fB84Db1jbHB4b4oO2mXVz+7i/uj2qqiKyDefl0Eav9RoKIjJGVbtFRHDyhUdV9a880MO3Nkxn/GxXa5v+I+S1Ah6wEPhbt5Fewukp4Bd+282FR3Cig3/wSA8/2zCd8bNdrW36jKyL/L1AROpxunbFclJVn/RCHz9iNhwezK7J41cbmvM3DMPIQjK5t49hGIbRD+b8DcMwshBz/oZhGFmIOX/DMIws5P8Bbi+xqFD8Ky8AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig,ax = plt.subplots()\n",
    "sns.violinplot(data= coef[['LogistL2_Log', 'LogistL2_Accu', 'LogistL1_Log', 'LogistL1_Accu']])\n",
    "ax.set(title=\"Coef of the Models\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 系数分析结果:从上如可以看出，四种模型的系数绝对差距非常小，相对而言使用 L1正则+Log_loss 得到的系数分布更加集中稳定，波动小。下面我们看观察一下在测试集上面的性能："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.linear_model import LogisticRegression"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "8.298370904970383\n"
     ]
    }
   ],
   "source": [
    "Logist1 = LogisticRegression(C=LogistL2_Log.C_[0], penalty = 'l2', solver='liblinear')\n",
    "Logist1.fit(X_train, y_train)\n",
    "Logist1_predict = Logist1.predict(X_test)\n",
    "Logist1_log_loss_score = metrics.log_loss(y_test,Logist1_predict)\n",
    "Logist1_accuracy_score = metrics.accuracy_score(y_test,Logist1_predict)\n",
    "print(Logist1_log_loss_score) # 8.9711678660270"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.7597402597402597\n"
     ]
    }
   ],
   "source": [
    "Logist2 = LogisticRegression(C=LogistL2_Accu.C_[0], penalty = 'l2', solver='liblinear')\n",
    "Logist2.fit(X_train, y_train)\n",
    "Logist2_predict = Logist2.predict(X_test)\n",
    "Logist2_log_loss_score = metrics.log_loss(y_test,Logist2_predict)\n",
    "Logist2_accuracy_score = metrics.accuracy_score(y_test,Logist2_predict)\n",
    "print(Logist2_accuracy_score)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "8.298370904970383\n"
     ]
    }
   ],
   "source": [
    "Logist3 = LogisticRegression(C=LogistL1_Log.C_[0], penalty = 'l1', solver='liblinear')\n",
    "Logist3.fit(X_train, y_train)\n",
    "Logist3_predict = Logist3.predict(X_test)\n",
    "Logist3_log_loss_score = metrics.log_loss(y_test,Logist3_predict)\n",
    "Logist3_accuracy_score = metrics.accuracy_score(y_test,Logist3_predict)\n",
    "print(Logist3_log_loss_score)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.7532467532467533\n"
     ]
    }
   ],
   "source": [
    "Logist4 = LogisticRegression(C=LogistL1_Accu.C_[0], penalty = 'l1', solver='liblinear')\n",
    "Logist4.fit(X_train, y_train)\n",
    "Logist4_predict = Logist4.predict(X_test)\n",
    "Logist4_log_loss_score = metrics.log_loss(y_test,Logist4_predict)\n",
    "Logist4_accuracy_score = metrics.accuracy_score(y_test,Logist4_predict)\n",
    "print(Logist4_accuracy_score)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>L2</th>\n",
       "      <th>L1</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Log_loss</th>\n",
       "      <td>8.298371</td>\n",
       "      <td>8.298371</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Accuracy</th>\n",
       "      <td>0.759740</td>\n",
       "      <td>0.753247</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                L2        L1\n",
       "Log_loss  8.298371  8.298371\n",
       "Accuracy  0.759740  0.753247"
      ]
     },
     "execution_count": 63,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "score = np.array([Logist1_log_loss_score, Logist2_accuracy_score, Logist3_log_loss_score, Logist4_accuracy_score])\n",
    "score = score.reshape(2,-1)\n",
    "score = pd.DataFrame(score, columns = ['Log_loss', 'Accuracy'], index = ['L2', 'L1'])\n",
    "score = score.T\n",
    "score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0xaa1e90>"
      ]
     },
     "execution_count": 64,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAW4AAAD9CAYAAACcJ53WAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAD8JJREFUeJzt3X2MZXV9x/H3h92VcYFqC4OtrMusVm0Uq9hRUaQpYBvQRiWFCKitD+mqqRWKLcUmFW1LaltD1GhoNoDY8ugDJCtQBaxCSBUdWORBoLWIOqJlXBRdAQX59o856LDM7Jxl79nht7xfyWbvPffccz4X7nz2N797zj2pKiRJ7dhpqQNIkraOxS1JjbG4JakxFrckNcbilqTGWNyS1BiLW5IaY3FLUmMsbklqzPIhNrrHHnvUxMTEEJuWpB3S1Vdf/f2qGu+z7iDFPTExwdTU1BCblqQdUpJv9l3XqRJJaozFLUmNsbglqTGDzHFL0tDuu+8+pqenuffee5c6ylYZGxtj1apVrFix4hFvw+KW1KTp6Wl22203JiYmSLLUcXqpKjZu3Mj09DRr1qx5xNtxqkRSk+6991523333ZkobIAm77777Nv+WYHFLalZLpf2gUWS2uCWpMc5xS9ohTJxw0Ui3d9v7XrHoOrvuuiubNm16yLKTTz6ZU089leXLlzM+Ps7pp5/O3nvvPdJsj9niHvX/5KHcNnb0Ukfo5z13LXUC6VFh3333ZWpqipUrV3LKKadw/PHHc9555410H06VSNIIHXjggaxcuRKA/fbbj+np6ZHvw+KWpIGcdtppHHrooSPf7mN2qkSShnTmmWcyNTXF5ZdfPvJt9xpxJ/mLJDcmuSHJOUnGRp5EknYQl112GSeddBLr169n5513Hvn2Fy3uJHsB7wAmq2ofYBlw5MiTSNIOYMOGDbzlLW9h/fr17LnnnoPso+9UyXLg8UnuA1YCtw+SRpIeo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e+LJwPnM/gq4BzADvLGqvpXk6cCZzI6gLwLWVtW833WeZAK4sKr2STIG/CuzI+n7geOq6vNJ3gW8DrgP+B5wNLOjmH8BHuiWv62qpkb6oqVt0H0oeQ1wRFX9z1LnaYHFvYS6X0HvqapKciRwVFV5dSE9ZnSXQbwQuKCq3rnUeVphcS+hJAcwe8RJgB8Cb6qqry9tKkmPdhb3o0yS59AdMTLHT6vqRUuRR9Kjj8UtSY3xqBJJaozFLUmNsbglqTEWtyQ1xuKWpMb8P/+90+yizNgzAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "score.plot.bar(rot=0)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 结果测试集上的结果来看，在Log_loss评估下, L1正则+最优参数C 和 L2正则+最优参数C 最终结果完全一致;在Accuracy评估下,L1正则+最优参数C 和 L2正则+最优参数C也是近乎一致.(L2正则+最优参数C只有一点微弱的优势.)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 6.使用 GridSearchCV 和 log_loss 评价进行参数调优"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.model_selection import GridSearchCV"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [],
   "source": [
    "penaltys = ['l1','l2']\n",
    "Cs =  [1.00000000e-04, 2.63665090e-04, 6.95192796e-04, 1.83298071e-03,\n",
    "       4.83293024e-03, 1.27427499e-02, 3.35981829e-02, 8.85866790e-02,\n",
    "       2.33572147e-01, 6.15848211e-01, 1.62377674e+00, 4.28133240e+00,\n",
    "       1.12883789e+01, 2.97635144e+01, 7.84759970e+01, 2.06913808e+02,\n",
    "       5.45559478e+02, 1.43844989e+03, 3.79269019e+03, 1.00000000e+04]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [],
   "source": [
    "solver = ['liblinear']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [],
   "source": [
    "tuned_parameters = dict(penalty = penaltys, C = Cs, solver = solver)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [],
   "source": [
    "lr_penalty = LogisticRegression()\n",
    "grid = GridSearchCV(lr_penalty, tuned_parameters, cv = 5, scoring = 'neg_log_loss')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "GridSearchCV(cv=5, error_score='raise-deprecating',\n",
       "       estimator=LogisticRegression(C=1.0, class_weight=None, dual=False, fit_intercept=True,\n",
       "          intercept_scaling=1, max_iter=100, multi_class='warn',\n",
       "          n_jobs=None, penalty='l2', random_state=None, solver='warn',\n",
       "          tol=0.0001, verbose=0, warm_start=False),\n",
       "       fit_params=None, iid='warn', n_jobs=None,\n",
       "       param_grid={'penalty': ['l1', 'l2'], 'C': [0.0001, 0.00026366509, 0.000695192796, 0.00183298071, 0.00483293024, 0.0127427499, 0.0335981829, 0.088586679, 0.233572147, 0.615848211, 1.62377674, 4.2813324, 11.2883789, 29.7635144, 78.475997, 206.913808, 545.559478, 1438.44989, 3792.69019, 10000.0], 'solver': ['liblinear']},\n",
       "       pre_dispatch='2*n_jobs', refit=True, return_train_score='warn',\n",
       "       scoring='neg_log_loss', verbose=0)"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "grid.fit(X_train,y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.46995819023253116\n",
      "{'C': 0.233572147, 'penalty': 'l2', 'solver': 'liblinear'}\n"
     ]
    }
   ],
   "source": [
    "print(-grid.best_score_)\n",
    "print(grid.best_params_)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 得到的最参数为: L2正则，最优参数C为: 0.233572147 和 LogisticRegressionCV得到的参数一致"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 7.使用 GridSearchCV 和 Accuracy 评价进行参数调优"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "metadata": {},
   "outputs": [],
   "source": [
    "penaltys = ['l1','l2']\n",
    "Cs =  [1.00000000e-04, 2.63665090e-04, 6.95192796e-04, 1.83298071e-03,\n",
    "       4.83293024e-03, 1.27427499e-02, 3.35981829e-02, 8.85866790e-02,\n",
    "       2.33572147e-01, 6.15848211e-01, 1.62377674e+00, 4.28133240e+00,\n",
    "       1.12883789e+01, 2.97635144e+01, 7.84759970e+01, 2.06913808e+02,\n",
    "       5.45559478e+02, 1.43844989e+03, 3.79269019e+03, 1.00000000e+04]\n",
    "solver = ['liblinear']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "metadata": {},
   "outputs": [],
   "source": [
    "tuned_parameters = dict(penalty = penaltys, C = Cs, solver = solver)\n",
    "lr_penalty = LogisticRegression()\n",
    "grid = GridSearchCV(lr_penalty, tuned_parameters, cv = 5, scoring = 'accuracy')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "GridSearchCV(cv=5, error_score='raise-deprecating',\n",
       "       estimator=LogisticRegression(C=1.0, class_weight=None, dual=False, fit_intercept=True,\n",
       "          intercept_scaling=1, max_iter=100, multi_class='warn',\n",
       "          n_jobs=None, penalty='l2', random_state=None, solver='warn',\n",
       "          tol=0.0001, verbose=0, warm_start=False),\n",
       "       fit_params=None, iid='warn', n_jobs=None,\n",
       "       param_grid={'penalty': ['l1', 'l2'], 'C': [0.0001, 0.00026366509, 0.000695192796, 0.00183298071, 0.00483293024, 0.0127427499, 0.0335981829, 0.088586679, 0.233572147, 0.615848211, 1.62377674, 4.2813324, 11.2883789, 29.7635144, 78.475997, 206.913808, 545.559478, 1438.44989, 3792.69019, 10000.0], 'solver': ['liblinear']},\n",
       "       pre_dispatch='2*n_jobs', refit=True, return_train_score='warn',\n",
       "       scoring='accuracy', verbose=0)"
      ]
     },
     "execution_count": 71,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "grid.fit(X_train,y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.7719869706840391\n",
      "{'C': 0.615848211, 'penalty': 'l1', 'solver': 'liblinear'}\n"
     ]
    }
   ],
   "source": [
    "print(grid.best_score_)\n",
    "print(grid.best_params_)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 得到的最参数为: L1正则，最优参数C为: 0.615848211 和 LogisticRegressionCV得到的结果不一致，我们可以看看这个模型在测试集上面的得分情况。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.7597402597402597\n"
     ]
    }
   ],
   "source": [
    "## 计算改最优参数模型在测试集上面的得分\n",
    "Logist5 = LogisticRegression(C=0.615848211, penalty = 'l1', solver='liblinear')\n",
    "Logist5.fit(X_train, y_train)\n",
    "Logist5_predict = Logist5.predict(X_test)\n",
    "Logist5_log_loss_score = metrics.log_loss(y_test,Logist5_predict)\n",
    "Logist5_accuracy_score = metrics.accuracy_score(y_test,Logist5_predict)\n",
    "print(Logist5_accuracy_score)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 91,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "LogisticRegressionCV L2正则Accuracy得分:0.7597402597402597\n",
      "LogisticRegressionCV L1正则Accuracy得分:0.7532467532467533\n",
      "GridSearchCV L1正则Accuracy得分:0.7597402597402597\n"
     ]
    }
   ],
   "source": [
    "print('LogisticRegressionCV L2正则Accuracy得分:' + str(Logist2_accuracy_score))\n",
    "print('LogisticRegressionCV L1正则Accuracy得分:' + str(Logist4_accuracy_score))\n",
    "print('GridSearchCV L1正则Accuracy得分:' + str(Logist5_accuracy_score))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 结果:从上面对比可以得到: \n",
    "### 1.在Log_loss评价下,L1正则 + 参数C(C = 0.23357215) 和 L2正则 + 参数C(C = 0.23357215) 在测试集上评分一致。(得分:8.298370904970383)\n",
    "### 2.在Accuracy评价下, L1正则 + 参数C(C = 0.615848211) 和 L2正则 + 参数C(C = 1.62377674) 在测试集上评分一致。(得分:0.7597402597402597)之后可以将调优参数C做进一步细分，进行参数调优。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
